window.addEvent("domready",function(){__body=document.id("body");document.id(document.body).getElements(".content.inner a[href]").each(function(a){a.href.test("/"+window.location.host+"/")||a.href.test("gnpbu")||a.set("target","_blank")});if(el=document.id("prj-close"))el.addEvent("click",function(){__body.addClass("prjclosed");Cookie.write("prjclosed","1",{path:"/",duration:30,domain:docDomain});this.setStyle("display","none");document.id("prj-open").setStyle("display","block")}),"1"==Cookie.read("prjclosed")&&
el.fireEvent("click");(el=document.id("prj-open"))&&el.addEvent("click",function(){__body.removeClass("prjclosed");Cookie.write("prjclosed","0",{path:"/",duration:30,domain:docDomain});this.setStyle("display","none");document.id("prj-close").setStyle("display","block")});document.getElements(".inner img[title]").each(function(a,f){var d=(new Element("div",{"class":"imgcontainer"})).setStyles({margin:a.getStyle("margin"),display:a.getStyle("display"),"float":a.getStyle("float"),width:a.getSize().x}).wraps(a);
a.set("titletoshow",a.get("title"));(new Element("div",{"class":"imgcaption",html:a.get("titletoshow").replace(/\\n/g,"<br />")})).inject(d);a.addEvent("load",function(){this.getParent("div").setStyle("width",this.getSize().x);this.setStyle("margin","0");this.setStyle("float","none")})});try{document.getElements("a.ceraBox").cerabox({animation:"ease",displayTitle:!1,clickToClose:!0,preventScrolling:!0,group:!1})}catch(g){}document.id("topsearch")&&new OverText(document.id("topsearchquery"));document.getElements("#topsearch, .checkform").each(function(a){typeOf(a.ff)&&
(a.ff=new Form.Validator(a,{evaluateFieldsOnChange:!1,evaluateFieldsOnBlur:!1,evaluateOnSubmit:!0,serial:!1}))});try{(els=document.getElements(".focusme")[0])&&els.focus()}catch(h){}var b;(b=document.id("fedbackform"))&&b.getElement('input[name="timestamp"]').set("value","ok2go");document.getElements(".ajax-call").each(function(a){new Form.Request(a,a.getElement(".msg"),{spinnerTarget:a,evalScripts:!1,useSpinner:!0,resetForm:!1,onComplete:function(a){document.getElements(".hideonsubmit").setStyle("display",
"none")}})});document.getElements("a.disabled").addEvent("click",function(a){a.stop();a.preventDefault();return!1});document.getElements("#pinner").addEvent("click",function(){__body.toggleClass("pinned");this.toggleClass("act");document.id("breadcumbs")&&(pp=document.getElements("#content .inner.innerleft")[0],__body.hasClass("pinned")?(pp.setStyle("top",1*pp.getStyle("top").replace("px","")+document.getElements(".breadcumbs")[0].getSize().y),this.setStyle("top",document.id("breadcumbs").getSize().y+
17)):(pp.setStyle("top",null),this.setStyle("top",null)))});setTimeout(function(){var a=document.getElements(".inner img[alt]");new Tips(a,{text:"alt",onShow:function(a,d){a.setStyles({visibility:"hidden",display:"block"}).fade("in")}})},500);if(document.id("boookmarks-loader")){document.id("boookmarks-loader").set("load",{url:"/ajax/bookmarks/",evalScripts:!1,useSpinner:!0,spinnerOptions:{"class":"spinner-white"},method:"post",onComplete:function(){setTimeout(function(){window.zoomTips.attach(".publications-list .item .img");
document.getElements(".bmlist .delBook .del").addEvent("click",function(a){var b=this.getParent("a").get("rel"),d;for(j=0;j<localStorage.length;j++)for(var c=0;c<localStorage.length;c++)0===localStorage.key(c).indexOf(b)&&(localStorage.removeItem(localStorage.key(c)),d=!0);if(d){var e=this;(new Fx.Morph(this.getParent("div.item"),{duration:250,onComplete:function(){e.getParent("div.item").destroy();document.getElements("a.delBook").length||document.id("bmlistempty").setStyle("display","block").fade(1)}})).start({opacity:0,
height:0})}a.preventDefault();a.stop();return!1});document.getElements(".bmlist .delPage .del").addEvent("click",function(a){for(var b=this.getParent("a").get("rel"),d=this.getParent("div.item").getElement(".delBook"),c=0;c<localStorage.length;c++)0===localStorage.key(c).indexOf(b)&&(localStorage.removeItem(localStorage.key(c)),that=this,(new Fx.Morph(this.getParent("a.delPage"),{duration:250,onComplete:function(){that.getParent("a.delPage").destroy()}})).start({opacity:0,width:0}));2>this.getParent("div.item").getElements(".delPage").length&&
(new Fx.Morph(d.getParent("div.item"),{duration:250,onComplete:function(){d.getParent("div.item").destroy();document.getElements("a.delBook").length||document.id("bmlistempty").setStyle("display","block").fade(1)}})).start({opacity:0,height:0});a.preventDefault();a.stop();return!1})},10)}});b={};for(var e in localStorage)b[e]=localStorage.getItem(e);document.id("boookmarks-loader").get("load").post("bmlist="+JSON.stringify(b))}});
